import request from '@/utils/request'

const device = {
  // 分页查询
  queryPage(data) {
    return request({
      url: '/energy-carbon/ecp-admin/deviceWarning/queryPage',
      method: 'post',
      data
    })
  },
  // 详情
  detail(id) {
    return request({
      url: '/energy-carbon/ecp-admin/deviceWarning/detail',
      method: 'post',
      data: { id }
    })
  },
  // 新增
  add(data) {
    return request({
      url: '/energy-carbon/ecp-admin/deviceWarning/add',
      method: 'post',
      data
    })
  },
  // 编辑
  update(data) {
    return request({
      url: '/energy-carbon/ecp-admin/deviceWarning/update',
      method: 'post',
      data
    })
  },
  // 删除
  deleteById(data) {
    return request({
      url: '/energy-carbon/ecp-admin/deviceWarning/deleteById',
      method: 'post',
      data
    })
  },
  // 批量删除
  batchDelete(data) {
    return request({
      url: '/energy-carbon/ecp-admin/deviceWarning/batchDelete',
      method: 'post',
      data
    })
  }
}

export default device
